package cn.byapps.hw.dao;

import cn.byapps.hw.entity.HomeworkRequirement;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface HomeworkRequirementDao extends JpaRepository<HomeworkRequirement, String> {
    /**
     * 根据文件保存路径模糊查询
     *
     * @param filePath
     * @return
     */
    @Query("select (u) from HomeworkRequirement u where u.filePath like :filePath")
    List<HomeworkRequirement> findByFilePath(String filePath);
}
